/**  
 * @Title: WebController.java
 * @Package com.hiylo.web.controller
 * @Description: TODO
 * @author hiylo
 * @date 2014-4-17 下午3:33:37
 * @version V1.0  
 */
package com.hiylo.web.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.SessionAttributes;

import com.hiylo.util.IPSeeker;

/**
 * @version: 2014-4-17 下午3:33:37
 * @author: hiylo
 */
@Controller
@RequestMapping("/employee")
@SessionAttributes("employeeLogin")
public class WebController {
	@RequestMapping(value = "/", method = RequestMethod.GET)
	public void toIndex(HttpServletRequest request, Model model) {
		IPSeeker ip = new IPSeeker("ip data.dat", "D:/");
		// 测试IP 58.20.43.13
		String city = ip.getIPLocation("1.83.203.179").getCountry();
		city = city.substring(city.indexOf('省') + 1);
		city = city.substring(0, city.indexOf('市'));
	}
}
